<template>
  <VScaleScreen width="1920" height="1080" style="background: transparent" :full-screen="true">
    <Header></Header>
    <main class="mainBox">
      <div class="leftBox">
        <div class="shang">
          <haohao>
            <ECharts :option="option1"></ECharts>
          </haohao>
          <div class="title"></div>
        </div>
        <div class="xia">
          <haohao>
            <ECharts :option="option2"></ECharts>
          </haohao>
          <div class="title"></div>
        </div>
      </div>
      <div class="centerBox">
        <div class="shang">
          <div class="shang1">
            <div class="zuo">
              <div class="shu">1417552821</div>
            </div>
            <div class="you">
              <div class="shu">418509</div>
            </div>
          </div>
          <div class="shang2">
            <div class="zuo1">
              <div class="shu1">全国总人数</div>
            </div>
            <div class="you1">
              <div class="shu1">人口:TOP1:广东</div>
            </div>
          </div>
        </div>
        <div class="xia">
          <div class="map">
            <div class="chart"></div>
            <div class="map1"></div>
            <div class="map2"></div>
            <div class="map3"></div>
          </div>
        </div>
      </div>
      <div class="rightBox">
        <div class="shang">
          <haohao>
            <ECharts :option="option3"></ECharts>
          </haohao>
          <div class="title"></div>
        </div>
        <div class="xia">
          <haohao>
            <img src="./image/haohao.png" alt="" />
          </haohao>
          <div class="title"></div>
        </div>
      </div>
    </main>
  </VScaleScreen>
</template>

<script setup lang="ts">
import VScaleScreen from 'v-scale-screen'
import Header from './components/header/index.vue'
import haohao from './components/tubiao/index.vue'
import { createComponent } from 'echarts-for-vue'
import * as echarts from 'echarts'
import { h } from 'vue'
const ECharts = createComponent({ echarts, h })
import { option1 } from './Eachoption/option1.ts'
import { option2 } from './Eachoption/option2.ts'
import { option3 } from './Eachoption/option3.ts'
</script>

<style lang="scss">
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  background-image: url('./image/bg.jpg');
  background-size: cover;
}
.mainBox {
  width: 100%;
  height: 100%;
  margin-top: 10px;
  display: flex;
  .leftBox {
    width: 25%;
    height: 100%;
    // background: #000;
    .shang {
      width: 100%;
      height: 50%;
      background: rgba(25, 186, 139, 0.17);
      position: relative;
      padding: 10px;
      &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 20px;
        height: 20px;
        border-top: 2px solid #0ff;
        border-left: 2px solid #0ff;
      }
      &::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 20px;
        height: 20px;
        border-top: 2px solid #0ff;
        border-right: 2px solid #0ff;
      }
      .title {
        width: 100%;
        &::before {
          content: '';
          position: absolute;
          bottom: 0;
          left: 0;
          width: 20px;
          height: 20px;
          border-bottom: 2px solid #0ff;
          border-left: 2px solid #0ff;
        }
        &::after {
          content: '';
          position: absolute;
          bottom: 0;
          right: 0;
          width: 20px;
          height: 20px;
          border-bottom: 2px solid #0ff;
          border-right: 2px solid #0ff;
        }
      }
    }
    .xia {
      width: 100%;
      height: 40%;
      margin-top: 20px;
      background: rgba(25, 186, 139, 0.17);
      position: relative;
      &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 20px;
        height: 20px;
        border-top: 2px solid #0ff;
        border-left: 2px solid #0ff;
      }
      &::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 20px;
        height: 20px;
        border-top: 2px solid #0ff;
        border-right: 2px solid #0ff;
      }
      .title {
        width: 100%;
        &::before {
          content: '';
          position: absolute;
          bottom: 0;
          left: 0;
          width: 20px;
          height: 20px;
          border-bottom: 2px solid #0ff;
          border-left: 2px solid #0ff;
        }
        &::after {
          content: '';
          position: absolute;
          bottom: 0;
          right: 0;
          width: 20px;
          height: 20px;
          border-bottom: 2px solid #0ff;
          border-right: 2px solid #0ff;
        }
      }
    }
  }
  .centerBox {
    width: 50%;
    height: 100%;
    // background: #fff;
    margin: 0 20px;
    .shang {
      width: 100%;
      height: 20%;
      background: rgba(25, 186, 139, 0.17);
      margin-bottom: 2%;
      position: relative;
      padding: 20px;
      .shang1 {
        width: 100%;
        height: 50%;
        border: 1px solid rgba(25, 186, 139, 0.17);
        display: flex;
        position: relative;
        &::before {
          content: '';
          position: absolute;
          top: 0;
          left: 0;
          width: 30px;
          height: 20px;
          border-top: 2px solid #0ff;
          border-left: 2px solid #0ff;
        }
        &::after {
          content: '';
          position: absolute;
          bottom: 0;
          right: 0;
          width: 30px;
          height: 20px;
          border-bottom: 2px solid #0ff;
          border-right: 2px solid #0ff;
        }
      }
      .zuo {
        flex: 1;
        color: #fff;
        font-size: 20px;
        .shu {
          text-align: center;
          font-size: 50px;
          color: #f5f22c;
          font-weight: 600;
        }
      }
      .you {
        flex: 1;
        .shu {
          text-align: center;
          font-size: 50px;
          color: #f5f22c;
          font-weight: 600;
        }
      }
      .shang2 {
        width: 100%;
        height: 50%;
        // border: 1px solid rgba(25, 186, 139, 0.17);
        display: flex;
        padding: 10px;
        .zuo1 {
          flex: 1;
          color: #fff;
          font-size: 16px;
          .shu1 {
            text-align: center;
            // font-size: 50px;
            color: #fff;
            font-weight: 600;
          }
        }
        .you1 {
          flex: 1;
          .shu1 {
            text-align: center;
            // font-size: 50px;
            color: #fff;
            font-weight: 600;
          }
        }
      }
    }
    .xia {
      width: 100%;
      height: 70%;
      margin-top: 20px;
      background: rgba(25, 186, 139, 0.17);
      .map {
        position: relative;
        height: 810px;

        .chart {
          position: absolute;
          top: 0;
          left: 0;
          z-index: 5;
          height: 100%;
          width: 100%;
        }
        .map1,
        .map2,
        .map3 {
          position: absolute;
          top: 50%;
          left: 50%;
          transform: translate(-50%, -50%);
          width: 518px;
          height: 518px;
          background: url('./image/map.png') no-repeat;
          background-size: 100% 100%;
          opacity: 0.3;
        }
        .map2 {
          width: 643px;
          height: 643px;
          background: url(('./image/lbx.png')) no-repeat;
          opacity: 0.6;
          z-index: 2;
          animation: rotate 15s linear infinite;
        }
        @keyframes rotate {
          from {
            transform: translate(-50%, -50%) rotate(0deg);
          }
          to {
            transform: translate(-50%, -50%) rotate(360deg);
          }
        }
        .map3 {
          width: 566px;
          height: 566px;
          background: url(('./assets/jt.png')) no-repeat;
          animation: rotate 10s linear infinite;
        }
        @keyframes rotate {
          from {
            transform: translate(-50%, -50%) rotate(0deg);
          }
          to {
            transform: translate(-50%, -50%) rotate(-360deg);
          }
        }
      }
    }
  }
  .rightBox {
    width: 25%;
    height: 100%;
    // background: #000;

    .shang {
      width: 100%;
      height: 47%;
      background: rgba(25, 186, 139, 0.17);
      margin-bottom: 5%;
      padding: 10px;
      position: relative;
      &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 20px;
        height: 20px;
        border-top: 2px solid #0ff;
        border-left: 2px solid #0ff;
      }
      &::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 20px;
        height: 20px;
        border-top: 2px solid #0ff;
        border-right: 2px solid #0ff;
      }
      .title {
        width: 100%;
        &::before {
          content: '';
          position: absolute;
          bottom: 0;
          left: 0;
          width: 20px;
          height: 20px;
          border-bottom: 2px solid #0ff;
          border-left: 2px solid #0ff;
        }
        &::after {
          content: '';
          position: absolute;
          bottom: 0;
          right: 0;
          width: 20px;
          height: 20px;
          border-bottom: 2px solid #0ff;
          border-right: 2px solid #0ff;
        }
      }
    }
    .xia {
      width: 100%;
      height: 48%;
      margin-top: 20px;
      background: rgba(25, 186, 139, 0.17);
      padding: 10px;
      position: relative;
      &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 20px;
        height: 20px;
        border-top: 2px solid #0ff;
        border-left: 2px solid #0ff;
      }
      &::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 20px;
        height: 20px;
        border-top: 2px solid #0ff;
        border-right: 2px solid #0ff;
      }
      .title {
        width: 100%;
        &::before {
          content: '';
          position: absolute;
          bottom: 0;
          left: 0;
          width: 20px;
          height: 20px;
          border-bottom: 2px solid #0ff;
          border-left: 2px solid #0ff;
        }
        &::after {
          content: '';
          position: absolute;
          bottom: 0;
          right: 0;
          width: 20px;
          height: 20px;
          border-bottom: 2px solid #0ff;
          border-right: 2px solid #0ff;
        }
      }
      img {
        width: 95%;
        height: 80%;
        margin: 0 auto;
        display: block;
      }
    }
  }
}
</style>